package com.exam.service.impl;

import com.exam.dao.IStudentDao;
import com.exam.entity.Student;
import com.exam.service.StudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class StudentServiceImpl implements StudentService{

	@Resource
	private IStudentDao stuDao;

	/**
	 * 得到所有学生信息
	 * @return
	 */
	@Override
	public List<Map<String, Object>> getAllStudents() {
		return stuDao.getAllStudents();
	}

	/**
	 * 修改学号对应的学生信息
	 * @return
	 */
	@Override
	public int saveInfo(Student student) {
		return stuDao.saveInfo(student);
	}

	@Override
	public int doImportStu(List<Student> list) {
		return stuDao.doImportStu(list);
	}

	@Override
	public Student getBySno(String sno) {
		return stuDao.getBySno(sno);
	}

	public IStudentDao getStuDao() {
		return stuDao;
	}

	public void setStuDao(IStudentDao stuDao) {
		this.stuDao = stuDao;
	}
}
